﻿using SD.ContentSystem.Domain.Entities;
using SD.Infrastructure.RepositoryBase;
using System.Collections.Generic;

namespace SD.ContentSystem.Domain.IRepositories.Interfaces
{
    /// <summary>
    /// 相片仓储接口
    /// </summary>
    public interface IPhotoRepository : IAggRootRepository<Photo>
    {
        #region # 根据相册获取相片列表 —— IEnumerable<Photo> FindByAlbum(string photoAlbumNo)
        /// <summary>
        /// 根据相册获取相片列表
        /// </summary>
        /// <param name="photoAlbumNo">相册编号</param>
        /// <returns>相片列表</returns>
        IEnumerable<Photo> FindByAlbum(string photoAlbumNo);
        #endregion

        #region # 分页获取相片列表 —— IEnumerable<Photo> FindByPage(string keywords, string photoAlbumNo...
        /// <summary>
        /// 分页获取相片列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="photoAlbumNo">相册编号</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="rowCount">总记录条数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns>相片列表</returns>
        IEnumerable<Photo> FindByPage(string keywords, string photoAlbumNo, int pageIndex, int pageSize, out int rowCount, out int pageCount);
        #endregion

        #region # 相册下是否存在相片 —— bool ExistsByAlbum(string albumNo)
        /// <summary>
        /// 相册下是否存在相片
        /// </summary>
        /// <param name="albumNo">相册编号</param>
        /// <returns>是否存在</returns>
        bool ExistsByAlbum(string albumNo);
        #endregion
    }
}
